3.14 \(\int \frac{(A+B x) \left (a+b x+c x^2\right )^2}{d+e x+f x^2} \, dx\)

Optimal. Leaf size=542 \[ \frac{\log \left (d+e x+f x^2\right ) \left (B \left (-f^2 \left (-a^2 f^2+2 a b e f+b^2 \left (-\left (e^2-d f\right )\right )\right )+2 c f \left (a f \left (e^2-d f\right )-b \left (e^3-2 d e f\right )\right )+c^2 \left (d^2 f^2-3 d e^2 f+e^4\right )\right )+A f (c e-b f) \left (f (b e-2 a f)-c \left (e^2-2 d f\right )\right )\right )}{2 f^5}-\frac{\tanh ^{-1}\left (\frac{e+2 f x}{\sqrt{e^2-4 d f}}\right ) \left (A f \left (-f^2 \left (-2 a^2 f^2+2 a b e f+b^2 \left (-\left (e^2-2 d f\right )\right )\right )+2 c f \left (a f \left (e^2-2 d f\right )-b \left (e^3-3 d e f\right )\right )+c^2 \left (2 d^2 f^2-4 d e^2 f+e^4\right )\right )-B \left (f^2 \left (a^2 e f^2-2 a b f \left (e^2-2 d f\right )+b^2 \left (e^3-3 d e f\right )\right )+2 c f \left (a e f \left (e^2-3 d f\right )-b \left (2 d^2 f^2-4 d e^2 f+e^4\right )\right )+c^2 \left (5 d^2 e f^2-5 d e^3 f+e^5\right )\right )\right )}{f^5 \sqrt{e^2-4 d f}}+\frac{x \left (A f \left (-2 c f (b e-a f)+b^2 f^2+c^2 \left (e^2-d f\right )\right )+B (c e-b f) \left (f (b e-2 a f)-c \left (e^2-2 d f\right )\right )\right )}{f^4}-\frac{x^2 \left (A c f (c e-2 b f)-B \left (-2 c f (b e-a f)+b^2 f^2+c^2 \left (e^2-d f\right )\right )\right )}{2 f^3}-\frac{c x^3 (-A c f-2 b B f+B c e)}{3 f^2}+\frac{B c^2 x^4}{4 f} \]

[Out]

((B*(c*e - b*f)*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f)) + A*f*(b^2*f^2 - 2*c*f*(b*e
- a*f) + c^2*(e^2 - d*f)))*x)/f^4 - ((A*c*f*(c*e - 2*b*f) - B*(b^2*f^2 - 2*c*f*(
b*e - a*f) + c^2*(e^2 - d*f)))*x^2)/(2*f^3) - (c*(B*c*e - 2*b*B*f - A*c*f)*x^3)/
(3*f^2) + (B*c^2*x^4)/(4*f) - ((A*f*(c^2*(e^4 - 4*d*e^2*f + 2*d^2*f^2) - f^2*(2*
a*b*e*f - 2*a^2*f^2 - b^2*(e^2 - 2*d*f)) + 2*c*f*(a*f*(e^2 - 2*d*f) - b*(e^3 - 3
*d*e*f))) - B*(c^2*(e^5 - 5*d*e^3*f + 5*d^2*e*f^2) + f^2*(a^2*e*f^2 - 2*a*b*f*(e
^2 - 2*d*f) + b^2*(e^3 - 3*d*e*f)) + 2*c*f*(a*e*f*(e^2 - 3*d*f) - b*(e^4 - 4*d*e
^2*f + 2*d^2*f^2))))*ArcTanh[(e + 2*f*x)/Sqrt[e^2 - 4*d*f]])/(f^5*Sqrt[e^2 - 4*d
*f]) + ((A*f*(c*e - b*f)*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f)) + B*(c^2*(e^4 - 3*d
*e^2*f + d^2*f^2) - f^2*(2*a*b*e*f - a^2*f^2 - b^2*(e^2 - d*f)) + 2*c*f*(a*f*(e^
2 - d*f) - b*(e^3 - 2*d*e*f))))*Log[d + e*x + f*x^2])/(2*f^5)

_______________________________________________________________________________________

Rubi [A]  time = 2.96122, antiderivative size = 542, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167 \[ \frac{\log \left (d+e x+f x^2\right ) \left (B \left (-f^2 \left (-a^2 f^2+2 a b e f+b^2 \left (-\left (e^2-d f\right )\right )\right )+2 c f \left (a f \left (e^2-d f\right )-b \left (e^3-2 d e f\right )\right )+c^2 \left (d^2 f^2-3 d e^2 f+e^4\right )\right )+A f (c e-b f) \left (f (b e-2 a f)-c \left (e^2-2 d f\right )\right )\right )}{2 f^5}-\frac{\tanh ^{-1}\left (\frac{e+2 f x}{\sqrt{e^2-4 d f}}\right ) \left (A f \left (-f^2 \left (-2 a^2 f^2+2 a b e f+b^2 \left (-\left (e^2-2 d f\right )\right )\right )+2 c f \left (a f \left (e^2-2 d f\right )-b \left (e^3-3 d e f\right )\right )+c^2 \left (2 d^2 f^2-4 d e^2 f+e^4\right )\right )-B \left (f^2 \left (a^2 e f^2-2 a b f \left (e^2-2 d f\right )+b^2 \left (e^3-3 d e f\right )\right )+2 c f \left (a e f \left (e^2-3 d f\right )-b \left (2 d^2 f^2-4 d e^2 f+e^4\right )\right )+c^2 \left (5 d^2 e f^2-5 d e^3 f+e^5\right )\right )\right )}{f^5 \sqrt{e^2-4 d f}}-\frac{x \left (B (c e-b f) \left (2 a f^2-b e f-2 c d f+c e^2\right )-A f \left (-2 c f (b e-a f)+b^2 f^2+c^2 \left (e^2-d f\right )\right )\right )}{f^4}-\frac{x^2 \left (A c f (c e-2 b f)-B \left (-2 c f (b e-a f)+b^2 f^2+c^2 \left (e^2-d f\right )\right )\right )}{2 f^3}-\frac{c x^3 (-A c f-2 b B f+B c e)}{3 f^2}+\frac{B c^2 x^4}{4 f} \]

Antiderivative was successfully verified.

[In]  Int[((A + B*x)*(a + b*x + c*x^2)^2)/(d + e*x + f*x^2),x]

[Out]

-(((B*(c*e - b*f)*(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2) - A*f*(b^2*f^2 - 2*c*f*(b*
e - a*f) + c^2*(e^2 - d*f)))*x)/f^4) - ((A*c*f*(c*e - 2*b*f) - B*(b^2*f^2 - 2*c*
f*(b*e - a*f) + c^2*(e^2 - d*f)))*x^2)/(2*f^3) - (c*(B*c*e - 2*b*B*f - A*c*f)*x^
3)/(3*f^2) + (B*c^2*x^4)/(4*f) - ((A*f*(c^2*(e^4 - 4*d*e^2*f + 2*d^2*f^2) - f^2*
(2*a*b*e*f - 2*a^2*f^2 - b^2*(e^2 - 2*d*f)) + 2*c*f*(a*f*(e^2 - 2*d*f) - b*(e^3
- 3*d*e*f))) - B*(c^2*(e^5 - 5*d*e^3*f + 5*d^2*e*f^2) + f^2*(a^2*e*f^2 - 2*a*b*f
*(e^2 - 2*d*f) + b^2*(e^3 - 3*d*e*f)) + 2*c*f*(a*e*f*(e^2 - 3*d*f) - b*(e^4 - 4*
d*e^2*f + 2*d^2*f^2))))*ArcTanh[(e + 2*f*x)/Sqrt[e^2 - 4*d*f]])/(f^5*Sqrt[e^2 -
4*d*f]) + ((A*f*(c*e - b*f)*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f)) + B*(c^2*(e^4 -
3*d*e^2*f + d^2*f^2) - f^2*(2*a*b*e*f - a^2*f^2 - b^2*(e^2 - d*f)) + 2*c*f*(a*f*
(e^2 - d*f) - b*(e^3 - 2*d*e*f))))*Log[d + e*x + f*x^2])/(2*f^5)

_______________________________________________________________________________________

Rubi in Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)*(c*x**2+b*x+a)**2/(f*x**2+e*x+d),x)

[Out]

Timed out

_______________________________________________________________________________________

Mathematica [A]  time = 1.8531, size = 535, normalized size = 0.99 \[ \frac{6 \log (d+x (e+f x)) \left (B \left (f^2 \left (a^2 f^2-2 a b e f+b^2 \left (e^2-d f\right )\right )-2 c f \left (a f \left (d f-e^2\right )+b \left (e^3-2 d e f\right )\right )+c^2 \left (d^2 f^2-3 d e^2 f+e^4\right )\right )+A f (b f-c e) \left (f (2 a f-b e)+c \left (e^2-2 d f\right )\right )\right )-\frac{12 \tan ^{-1}\left (\frac{e+2 f x}{\sqrt{4 d f-e^2}}\right ) \left (B \left (f^2 \left (a^2 e f^2+2 a b f \left (2 d f-e^2\right )+b^2 \left (e^3-3 d e f\right )\right )-2 c f \left (b \left (2 d^2 f^2-4 d e^2 f+e^4\right )-a e f \left (e^2-3 d f\right )\right )+c^2 \left (5 d^2 e f^2-5 d e^3 f+e^5\right )\right )-A f \left (f^2 \left (2 a^2 f^2-2 a b e f+b^2 \left (e^2-2 d f\right )\right )+2 c f \left (a f \left (e^2-2 d f\right )-b \left (e^3-3 d e f\right )\right )+c^2 \left (2 d^2 f^2-4 d e^2 f+e^4\right )\right )\right )}{\sqrt{4 d f-e^2}}+6 f^2 x^2 \left (B \left (2 c f (a f-b e)+b^2 f^2+c^2 \left (e^2-d f\right )\right )+A c f (2 b f-c e)\right )+12 f x \left (A f \left (2 c f (a f-b e)+b^2 f^2+c^2 \left (e^2-d f\right )\right )-B (c e-b f) \left (f (2 a f-b e)+c \left (e^2-2 d f\right )\right )\right )+4 c f^3 x^3 (A c f+2 b B f-B c e)+3 B c^2 f^4 x^4}{12 f^5} \]

Antiderivative was successfully verified.

[In]  Integrate[((A + B*x)*(a + b*x + c*x^2)^2)/(d + e*x + f*x^2),x]

[Out]

(12*f*(-(B*(c*e - b*f)*(f*(-(b*e) + 2*a*f) + c*(e^2 - 2*d*f))) + A*f*(b^2*f^2 +
2*c*f*(-(b*e) + a*f) + c^2*(e^2 - d*f)))*x + 6*f^2*(A*c*f*(-(c*e) + 2*b*f) + B*(
b^2*f^2 + 2*c*f*(-(b*e) + a*f) + c^2*(e^2 - d*f)))*x^2 + 4*c*f^3*(-(B*c*e) + 2*b
*B*f + A*c*f)*x^3 + 3*B*c^2*f^4*x^4 - (12*(-(A*f*(c^2*(e^4 - 4*d*e^2*f + 2*d^2*f
^2) + f^2*(-2*a*b*e*f + 2*a^2*f^2 + b^2*(e^2 - 2*d*f)) + 2*c*f*(a*f*(e^2 - 2*d*f
) - b*(e^3 - 3*d*e*f)))) + B*(c^2*(e^5 - 5*d*e^3*f + 5*d^2*e*f^2) + f^2*(a^2*e*f
^2 + 2*a*b*f*(-e^2 + 2*d*f) + b^2*(e^3 - 3*d*e*f)) - 2*c*f*(-(a*e*f*(e^2 - 3*d*f
)) + b*(e^4 - 4*d*e^2*f + 2*d^2*f^2))))*ArcTan[(e + 2*f*x)/Sqrt[-e^2 + 4*d*f]])/
Sqrt[-e^2 + 4*d*f] + 6*(A*f*(-(c*e) + b*f)*(f*(-(b*e) + 2*a*f) + c*(e^2 - 2*d*f)
) + B*(c^2*(e^4 - 3*d*e^2*f + d^2*f^2) + f^2*(-2*a*b*e*f + a^2*f^2 + b^2*(e^2 -
d*f)) - 2*c*f*(a*f*(-e^2 + d*f) + b*(e^3 - 2*d*e*f))))*Log[d + x*(e + f*x)])/(12
*f^5)

_______________________________________________________________________________________

Maple [B]  time = 0.013, size = 1672, normalized size = 3.1 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)*(c*x^2+b*x+a)^2/(f*x^2+e*x+d),x)

[Out]

6/f^2/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*B*a*c*d*e+2/3/f*B*x^
3*b*c+1/f*A*x^2*b*c+1/2/f*ln(f*x^2+e*x+d)*B*a^2+2/(4*d*f-e^2)^(1/2)*arctan((2*f*
x+e)/(4*d*f-e^2)^(1/2))*A*a^2-2/f^2*B*b*c*d*x+1/2/f*B*x^2*b^2+1/f*A*b^2*x+1/3/f*
A*x^3*c^2+1/f*B*x^2*a*c-1/2/f^2*B*x^2*c^2*d+2/f*A*c*a*x-1/f^2*A*c^2*d*x+2/f*b*B*
a*x-4/f/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*A*a*c*d+1/2/f^3*B*
x^2*c^2*e^2-1/2/f^2*A*x^2*c^2*e-1/2/f^2*ln(f*x^2+e*x+d)*B*b^2*d+1/2/f^3*ln(f*x^2
+e*x+d)*B*b^2*e^2+1/2/f^3*ln(f*x^2+e*x+d)*B*c^2*d^2+1/f*ln(f*x^2+e*x+d)*A*a*b-1/
2/f^4*ln(f*x^2+e*x+d)*A*c^2*e^3-1/2/f^2*ln(f*x^2+e*x+d)*A*b^2*e+1/2/f^5*ln(f*x^2
+e*x+d)*B*c^2*e^4+2/f^2/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d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f/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*B*a*b*d+3/f^2/(4*d*f
-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*B*b^2*d*e+5/f^4/(4*d*f-e^2)^(1/2
)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*B*c^2*d*e^3-2/f/(4*d*f-e^2)^(1/2)*arctan((
2*f*x+e)/(4*d*f-e^2)^(1/2))*e*A*a*b+2/f^2/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*
d*f-e^2)^(1/2))*e^2*A*a*c-2/f^3/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(
1/2))*e^3*A*b*c+2/f^2/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*e^2*
B*a*b-2/f^3/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*e^3*B*a*c+2/f^
3*ln(f*x^2+e*x+d)*B*b*c*d*e-8/f^3/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)
^(1/2))*B*b*c*d*e^2+6/f^2/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*
A*b*c*d*e+1/f^3*ln(f*x^2+e*x+d)*A*c^2*d*e+1/f^3*A*c^2*e^2*x-1/f^2*b^2*B*e*x-1/f^
4*B*c^2*e^3*x-1/3/f^2*B*x^3*c^2*e+1/4*B*c^2*x^4/f

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + b*x + a)^2*(B*x + A)/(f*x^2 + e*x + d),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.425817, size = 1, normalized size = 0. \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + b*x + a)^2*(B*x + A)/(f*x^2 + e*x + d),x, algorithm="fricas")

[Out]

[-1/12*(6*(B*c^2*e^5 - 2*A*a^2*f^5 + (2*(2*B*a*b + A*b^2 + 2*A*a*c)*d + (B*a^2 +
 2*A*a*b)*e)*f^4 - (2*(2*B*b*c + A*c^2)*d^2 + 3*(B*b^2 + 2*(B*a + A*b)*c)*d*e +
(2*B*a*b + A*b^2 + 2*A*a*c)*e^2)*f^3 + (5*B*c^2*d^2*e + 4*(2*B*b*c + A*c^2)*d*e^
2 + (B*b^2 + 2*(B*a + A*b)*c)*e^3)*f^2 - (5*B*c^2*d*e^3 + (2*B*b*c + A*c^2)*e^4)
*f)*log(-(e^3 - 4*d*e*f + 2*(e^2*f - 4*d*f^2)*x - (2*f^2*x^2 + 2*e*f*x + e^2 - 2
*d*f)*sqrt(e^2 - 4*d*f))/(f*x^2 + e*x + d)) - (3*B*c^2*f^4*x^4 - 4*(B*c^2*e*f^3
- (2*B*b*c + A*c^2)*f^4)*x^3 + 6*(B*c^2*e^2*f^2 + (B*b^2 + 2*(B*a + A*b)*c)*f^4
- (B*c^2*d + (2*B*b*c + A*c^2)*e)*f^3)*x^2 - 12*(B*c^2*e^3*f - (2*B*a*b + A*b^2
+ 2*A*a*c)*f^4 + ((2*B*b*c + A*c^2)*d + (B*b^2 + 2*(B*a + A*b)*c)*e)*f^3 - (2*B*
c^2*d*e + (2*B*b*c + A*c^2)*e^2)*f^2)*x + 6*(B*c^2*e^4 + (B*a^2 + 2*A*a*b)*f^4 -
 ((B*b^2 + 2*(B*a + A*b)*c)*d + (2*B*a*b + A*b^2 + 2*A*a*c)*e)*f^3 + (B*c^2*d^2
+ 2*(2*B*b*c + A*c^2)*d*e + (B*b^2 + 2*(B*a + A*b)*c)*e^2)*f^2 - (3*B*c^2*d*e^2
+ (2*B*b*c + A*c^2)*e^3)*f)*log(f*x^2 + e*x + d))*sqrt(e^2 - 4*d*f))/(sqrt(e^2 -
 4*d*f)*f^5), -1/12*(12*(B*c^2*e^5 - 2*A*a^2*f^5 + (2*(2*B*a*b + A*b^2 + 2*A*a*c
)*d + (B*a^2 + 2*A*a*b)*e)*f^4 - (2*(2*B*b*c + A*c^2)*d^2 + 3*(B*b^2 + 2*(B*a +
A*b)*c)*d*e + (2*B*a*b + A*b^2 + 2*A*a*c)*e^2)*f^3 + (5*B*c^2*d^2*e + 4*(2*B*b*c
 + A*c^2)*d*e^2 + (B*b^2 + 2*(B*a + A*b)*c)*e^3)*f^2 - (5*B*c^2*d*e^3 + (2*B*b*c
 + A*c^2)*e^4)*f)*arctan(-sqrt(-e^2 + 4*d*f)*(2*f*x + e)/(e^2 - 4*d*f)) - (3*B*c
^2*f^4*x^4 - 4*(B*c^2*e*f^3 - (2*B*b*c + A*c^2)*f^4)*x^3 + 6*(B*c^2*e^2*f^2 + (B
*b^2 + 2*(B*a + A*b)*c)*f^4 - (B*c^2*d + (2*B*b*c + A*c^2)*e)*f^3)*x^2 - 12*(B*c
^2*e^3*f - (2*B*a*b + A*b^2 + 2*A*a*c)*f^4 + ((2*B*b*c + A*c^2)*d + (B*b^2 + 2*(
B*a + A*b)*c)*e)*f^3 - (2*B*c^2*d*e + (2*B*b*c + A*c^2)*e^2)*f^2)*x + 6*(B*c^2*e
^4 + (B*a^2 + 2*A*a*b)*f^4 - ((B*b^2 + 2*(B*a + A*b)*c)*d + (2*B*a*b + A*b^2 + 2
*A*a*c)*e)*f^3 + (B*c^2*d^2 + 2*(2*B*b*c + A*c^2)*d*e + (B*b^2 + 2*(B*a + A*b)*c
)*e^2)*f^2 - (3*B*c^2*d*e^2 + (2*B*b*c + A*c^2)*e^3)*f)*log(f*x^2 + e*x + d))*sq
rt(-e^2 + 4*d*f))/(sqrt(-e^2 + 4*d*f)*f^5)]

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)*(c*x**2+b*x+a)**2/(f*x**2+e*x+d),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.277663, size = 996, normalized size = 1.84 \[ \frac{3 \, B c^{2} f^{3} x^{4} + 8 \, B b c f^{3} x^{3} + 4 \, A c^{2} f^{3} x^{3} - 4 \, B c^{2} f^{2} x^{3} e - 6 \, B c^{2} d f^{2} x^{2} + 6 \, B b^{2} f^{3} x^{2} + 12 \, B a c f^{3} x^{2} + 12 \, A b c f^{3} x^{2} - 12 \, B b c f^{2} x^{2} e - 6 \, A c^{2} f^{2} x^{2} e - 24 \, B b c d f^{2} x - 12 \, A c^{2} d f^{2} x + 24 \, B a b f^{3} x + 12 \, A b^{2} f^{3} x + 24 \, A a c f^{3} x + 6 \, B c^{2} f x^{2} e^{2} + 24 \, B c^{2} d f x e - 12 \, B b^{2} f^{2} x e - 24 \, B a c f^{2} x e - 24 \, A b c f^{2} x e + 24 \, B b c f x e^{2} + 12 \, A c^{2} f x e^{2} - 12 \, B c^{2} x e^{3}}{12 \, f^{4}} + \frac{{\left (B c^{2} d^{2} f^{2} - B b^{2} d f^{3} - 2 \, B a c d f^{3} - 2 \, A b c d f^{3} + B a^{2} f^{4} + 2 \, A a b f^{4} + 4 \, B b c d f^{2} e + 2 \, A c^{2} d f^{2} e - 2 \, B a b f^{3} e - A b^{2} f^{3} e - 2 \, A a c f^{3} e - 3 \, B c^{2} d f e^{2} + B b^{2} f^{2} e^{2} + 2 \, B a c f^{2} e^{2} + 2 \, A b c f^{2} e^{2} - 2 \, B b c f e^{3} - A c^{2} f e^{3} + B c^{2} e^{4}\right )}{\rm ln}\left (f x^{2} + x e + d\right )}{2 \, f^{5}} + \frac{{\left (4 \, B b c d^{2} f^{3} + 2 \, A c^{2} d^{2} f^{3} - 4 \, B a b d f^{4} - 2 \, A b^{2} d f^{4} - 4 \, A a c d f^{4} + 2 \, A a^{2} f^{5} - 5 \, B c^{2} d^{2} f^{2} e + 3 \, B b^{2} d f^{3} e + 6 \, B a c d f^{3} e + 6 \, A b c d f^{3} e - B a^{2} f^{4} e - 2 \, A a b f^{4} e - 8 \, B b c d f^{2} e^{2} - 4 \, A c^{2} d f^{2} e^{2} + 2 \, B a b f^{3} e^{2} + A b^{2} f^{3} e^{2} + 2 \, A a c f^{3} e^{2} + 5 \, B c^{2} d f e^{3} - B b^{2} f^{2} e^{3} - 2 \, B a c f^{2} e^{3} - 2 \, A b c f^{2} e^{3} + 2 \, B b c f e^{4} + A c^{2} f e^{4} - B c^{2} e^{5}\right )} \arctan \left (\frac{2 \, f x + e}{\sqrt{4 \, d f - e^{2}}}\right )}{\sqrt{4 \, d f - e^{2}} f^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + b*x + a)^2*(B*x + A)/(f*x^2 + e*x + d),x, algorithm="giac")

[Out]

1/12*(3*B*c^2*f^3*x^4 + 8*B*b*c*f^3*x^3 + 4*A*c^2*f^3*x^3 - 4*B*c^2*f^2*x^3*e -
6*B*c^2*d*f^2*x^2 + 6*B*b^2*f^3*x^2 + 12*B*a*c*f^3*x^2 + 12*A*b*c*f^3*x^2 - 12*B
*b*c*f^2*x^2*e - 6*A*c^2*f^2*x^2*e - 24*B*b*c*d*f^2*x - 12*A*c^2*d*f^2*x + 24*B*
a*b*f^3*x + 12*A*b^2*f^3*x + 24*A*a*c*f^3*x + 6*B*c^2*f*x^2*e^2 + 24*B*c^2*d*f*x
*e - 12*B*b^2*f^2*x*e - 24*B*a*c*f^2*x*e - 24*A*b*c*f^2*x*e + 24*B*b*c*f*x*e^2 +
 12*A*c^2*f*x*e^2 - 12*B*c^2*x*e^3)/f^4 + 1/2*(B*c^2*d^2*f^2 - B*b^2*d*f^3 - 2*B
*a*c*d*f^3 - 2*A*b*c*d*f^3 + B*a^2*f^4 + 2*A*a*b*f^4 + 4*B*b*c*d*f^2*e + 2*A*c^2
*d*f^2*e - 2*B*a*b*f^3*e - A*b^2*f^3*e - 2*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